package oop_06.homework04;

public class Warrior implements Fightable {
    private int experience;
    private int blood;

    public Warrior(int experience, int blood) {
        this.experience = experience;
        this.blood = blood;
    }

    public int getExperience() {
        return experience;
    }

    public void setExperience(int experience) {
        this.experience = experience;
    }

    public int getBlood() {
        return blood;
    }

    public void setBlood(int blood) {
        this.blood = blood;
    }

    @Override
    public void win() {
        System.out.println("win!!!!!!");
        this.experience+=10;
    }

    @Override
    public void injure(int x) {
        this.blood-=x;
        if(this.blood<MAX){
            System.out.println("dididididiidiidi,dangours!!!!!!");
        }
    }

    public void show(){
        System.out.println("经验"+this.experience);
        System.out.println("血量"+this.blood);
    }


}
